/*
 * Copyright © 2019-2020  Whale Cloud, Inc. All Rights Reserved.
 *
 * Notice: Whale Cloud Inc copyrights this specification.
 * No part of this specification may be reproduced in any form or means,
 * without the prior written consent of Whale Cloud Inc.
 *
 */
package com.wteam.modules.system.service;

import com.rabbitmq.client.Channel;
import com.wteam.modules.system.domain.SelectCourseRecord;
import com.wteam.modules.system.domain.dto.SelectCourseRecordDTO;
import com.wteam.modules.system.domain.criteria.SelectCourseRecordQueryCriteria;
import org.springframework.amqp.core.Message;
import org.springframework.data.domain.Pageable;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.*;

/**
 * 选课记录 业务层.
 *
 * @author herry_wong
 * @since 2021-01-06
 */
public interface SelectCourseRecordService{

    /**
     * 查询数据分页
     *
     * @param criteria /
     * @param pageable /
     * @return Map<String,Object> /
     */
    Map<String,Object> queryAll(SelectCourseRecordQueryCriteria criteria, Pageable pageable);

    /**
     * 查询所有数据不分页
     *
     * @param criteria /
     * @return /
     */
    List<SelectCourseRecordDTO> queryAll(SelectCourseRecordQueryCriteria criteria);

    /**
     * 根据ID查询
     *
     * @param id ID /
     * @return SelectCourseRecordDTO /
     */
    SelectCourseRecordDTO findDTOById(Integer id);

    /**
     * 创建
     *
     * @param resources /
     * @return SelectCourseRecordDTO /
     */
    SelectCourseRecordDTO create(SelectCourseRecord resources);

    /**
     * 编辑
     *
     * @param resources /
     */
    void update(SelectCourseRecord resources);

    /**
     * 多选删除
     *
     * @param ids /
     */
    void deleteAll(Set<Integer> ids);

    /**
     * 导出数据
     *
     * @param queryAll 待导出的数据
     * @param response /
     * @throws IOException /
     */
    void download(List<SelectCourseRecordDTO> queryAll, HttpServletResponse response) throws IOException;

    void handleRoundOneSelect(SelectCourseRecord selectCourseRecord, Channel channel, Message message);
    void handleRoundTwoSelect(SelectCourseRecord selectCourseRecord, Channel channel, Message message);
}